// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   ReadFile.java

package include.nseer_cookie;

import java.io.RandomAccessFile;
import java.util.ArrayList;
import java.util.List;

// Referenced classes of package include.nseer_cookie:
//			CreateFile

public class ReadFile
{

	public ReadFile()
	{
	}

	public List toFile(String xml_path)
	{
		ArrayList cont = new ArrayList();
		try
		{
			RandomAccessFile filee = new RandomAccessFile(xml_path, "r");
			long filePointer = 0L;
			for (long length = filee.length(); filePointer < length; filePointer = filee.getFilePointer())
			{
				String mk = filee.readLine();
				byte str[] = mk.getBytes("8859_1");
				String content = new String(str, "utf8");
				if (content.indexOf("</textarea>") != -1)
				{
					content = content.replace("</textarea>", "</textarea1>");
					cont.add(content);
				} else
				if (content.indexOf("</TEXTAREA>") != -1)
				{
					content = content.replace("</TEXTAREA>", "</TEXTAREA1>");
					cont.add(content);
				} else
				{
					cont.add(content);
				}
			}

		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
		return cont;
	}

	public static void main(String args[])
	{
		try
		{
			CreateFile cc = new CreateFile();
			cc.toFile("E:\\3333.jsp", "", "");
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}
}
